using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace TimeWar
{
    public class ParticleOctreeLeaf : ITimeWarObject
    {
        protected ParticleSystem m_object = null;


        public ParticleOctreeLeaf(ParticleSystem obj)
        {
            m_object = obj;
        }

        public Vector3 Vector
        {
            get
            {
                //return m_object;
                return Vector3.Zero;
            }
        }

        public ParticleSystem Value
        {
            get
            {
                return m_object;
            }
        }

        public float X
        {
            get
            {
                return m_object.averageX();
            }
        }

        public float Y
        {
            get
            {
                return m_object.averageY();
            }
        }

        public float Z
        {
            get
            {
                return m_object.averageZ();
            }
        }


        public GameState Update(TimeSpan gameTime, TimeSpan elapsedTime)
        {
            return m_object.Update(gameTime, elapsedTime);
        }

        public void Render()
        {
            m_object.Render();
        }

        public void setCamera(Matrix view, Matrix projection)
        {
            m_object.SetCamera(view, projection);
        }

    }
}